package edu.hm.compiler.parser.grammar;

import java.util.Collections;
import java.util.List;

import edu.hm.compiler.parser.grammar.predicate.Predicate;

/**
 * @author Saruman
 */
public class BodyOption
{
    private final List< Predicate > predicateList;

    /**
     * @param predicateList
     */
    public BodyOption( final List< Predicate > predicateList )
    {
        if( predicateList == null )
            throw new IllegalArgumentException( "predicateList must not be null!" ); //$NON-NLS-1$
        this.predicateList = Collections.unmodifiableList( predicateList );
    }

    public List< Predicate > getPredicateList()
    {
        return this.predicateList;
    }

    @Override
    public String toString()
    {
        return "BodyOption [predicateList=" + this.predicateList + "]"; //$NON-NLS-1$ //$NON-NLS-2$
    }
}
